import java.io.*;
import java.util.*;

class SuperMarket{

	String itemCode;
	String itemName;
	float price;
	static int count;
	
	public void setItemCode(String a){
		itemCode=new String(a);
	}
	
	public void setItemName(String a){
		itemName=new String(a);
	}
	
	public void setPrice(float a){
		price=a;
	}
	
	static int totalItems(){
		count++;
		return count;
	}
	
	
	public String getItemCode(){
		return itemCode;
	}
	
	public String getItemName(){
		return itemName;
	}
	
	public float getPrice(){
		return price;
	}
	
	public void display(){
		System.out.println(getItemCode()+"\t"+getItemName()+"\t"+getPrice()+"\n");
	}
	
	public void addItem(String itemcode,String itemName,float price){
			
	}
}

class Sup
{	
	public static void main(String[] args)throws IOException{
		int i=0;
		String ch="yes";
		float total=0;
		BufferedReader sc=new BufferedReader(new InputStreamReader(System.in));
		SuperMarket[] sm=new SuperMarket[10];
			
		while(ch.equals("yes")){
			sm[i]=new SuperMarket();
			System.out.println("Enter Code");
			sm[i].setItemCode(sc.readLine());
			System.out.println("Enter Item Name");
			sm[i].setItemName(sc.readLine());
			System.out.println("Enter price");
			sm[i].setPrice(Float.parseFloat(sc.readLine()));
			System.out.println("Want to add a new item");
			ch=sc.readLine();
			if(ch.equals("yes")){
				i=i+1;
				SuperMarket.totalItems();
			}		
		}
		
		
		for(int j=0;j<=i;j++){
			sm[j].display();
			total+=sm[j].getPrice();
		}
		System.out.println("Total Items:"+SuperMarket.totalItems());
		System.out.println("total Amount:"+total);
		
	}
}
